﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Orchard.View
{
    public partial class DataEntry : UserControl
    {
        //public DataEntry(Orchard.Model.TreeTypeEnum type)
        public DataEntry()
        {
            InitializeComponent();
        }

        public void specializeControl(Orchard.Model.TreeTypeEnum entryType)
        {
            switch (entryType)
            {
                //controls custom to the productivity panel
                case Orchard.Model.TreeTypeEnum.ProductivityTree:
                    TitleBox.Image = Orchard.Properties.Resources.Productivity_Sign;
                    InfoBox.Text = "Productivity (0 - 10)";
                    SpinnerLabel.Text = "Rating:";
                    InputSpinner.Minimum = 0;
                    InputSpinner.Maximum = 10;
                    InputSpinner.Increment = 1;
                    CheckBoxCollection.Items.AddRange(new object[]{"Off Day"});
                    break;

                //controls custom to the learning panel
                case Orchard.Model.TreeTypeEnum.LearningTree:
                    TitleBox.Image = Orchard.Properties.Resources.Learning_Sign;
                    InfoBox.Text = "Learning (Y/N)";
                    SpinnerLabel.Visible = false;
                    InputSpinner.Visible = false;
                    CheckBoxCollection.Items.AddRange(new object[]{"Off Day","Learned"});
                    break;

                //controls custom to the exercise panel
                case Orchard.Model.TreeTypeEnum.ExerciseTree:
                    TitleBox.Image = Orchard.Properties.Resources.Exercise_Sign;
                    InfoBox.Text = "Exercising (<60min)";
                    SpinnerLabel.Text = "Time:";
                    InputSpinner.Minimum = 0;
                    InputSpinner.Maximum = 60;
                    InputSpinner.Increment = 5;
                    CheckBoxCollection.Items.AddRange(new object[]{"Off Day"});
                    break;
            }
        }
    }
}
